# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-nikola
_pyname=Nikola
pkgver=8.2.2
pkgrel=0
pkgdesc="Modular, fast, simple, static python website generator"
options="!check" # Tests require more packages
url="https://getnikola.com"
# armv7, armhf, s390x, x86: py3-piexif
arch="noarch !armv7 !armhf !s390x !x86"
license="MIT"
depends="py3-babel py3-blinker py3-doit py3-dateutil py3-docutils py3-logbook
	py3-lxml py3-mako py3-markdown py3-natsort py3-piexif py3-pillow
	py3-pygments py3-pyphen py3-pyrss2gen py3-requests py3-unidecode py3-yapsy
	"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/N/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver

replaces="py-nikola" # Backwards compatibility
provides="py-nikola=$pkgver-r$pkgrel" # Backwards compatibility
subpackages="$pkgname-doc"

build() {
	python3 setup.py build
}

check() {
	py.test-3 -c /dev/null
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/tests
}

sha512sums="
f2bf38c81c2e01f6d6cb6a24d9b9ea95f047e9bd9987437df61cf1cb10c39c5f9259e8baa4c64dc24e4f69dc3b3e35e3553dced7d42c840645e024d6c21eb9ae  Nikola-8.2.2.tar.gz
"
